﻿<phone:PhoneApplicationPage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:ctrls="clr-namespace:GooNews.Controls"
                            xmlns:System="clr-namespace:System;assembly=mscorlib"
                            xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
                            xmlns:tk="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                            x:Class="GooNews.Pages.ShowSummaryPage"
                            SupportedOrientations="PortraitOrLandscape"
                            mc:Ignorable="d"
                            d:DesignHeight="768"
                            d:DesignWidth="480"
                            shell:SystemTray.IsVisible="True">
  <phone:PhoneApplicationPage.FontFamily>
    <StaticResource ResourceKey="PhoneFontFamilyNormal" />
  </phone:PhoneApplicationPage.FontFamily>
  <phone:PhoneApplicationPage.FontSize>
    <StaticResource ResourceKey="PhoneFontSizeNormal" />
  </phone:PhoneApplicationPage.FontSize>
  <phone:PhoneApplicationPage.Foreground>
    <StaticResource ResourceKey="foreBrush" />
  </phone:PhoneApplicationPage.Foreground>
  <phone:PhoneApplicationPage.ApplicationBar>
    <shell:ApplicationBar BackgroundColor="{StaticResource appBarColor}"
                          ForegroundColor="{StaticResource appBarForeColor}">
      <shell:ApplicationBar.MenuItems>
        <shell:ApplicationBarMenuItem x:Name="ieButton"
                                      Text="view in internet explorer"
                                      Click="ieButton_Click" />
        <shell:ApplicationBarMenuItem x:Name="shareViaEmailButton"
                                      Text="share via email"
                                      Click="shareViaEmailButton_Click" />
        <shell:ApplicationBarMenuItem x:Name="instaPaperButton"
                                      Text="add to InstaPaper"
                                      Click="instaPaperButton_Click" />
      </shell:ApplicationBar.MenuItems>
      <shell:ApplicationBarIconButton x:Name="refreshButton"
                                      IconUri="/icons/appbar.refresh.rest.png"
                                      Text="refresh"
                                      Click="refreshButton_Click" />
      <!--<shell:ApplicationBarIconButton x:Name="urlBarButton"
                                      IconUri="/icons/appbar.edit.rest.png"
                                      Text="show url"
                                      Click="urlBarButton_Click" />-->
    </shell:ApplicationBar>
  </phone:PhoneApplicationPage.ApplicationBar>
  <Grid x:Name="LayoutRoot"
        Background="{StaticResource backgroundBrush}">
    <VisualStateManager.VisualStateGroups>
      <VisualStateGroup x:Name="urlBoxStates"
                        ic:ExtendedVisualStateManager.UseFluidLayout="True">
        <VisualStateGroup.Transitions>
          <VisualTransition GeneratedDuration="0:0:0.3">
            <VisualTransition.GeneratedEasingFunction>
              <BackEase EasingMode="EaseOut" />
            </VisualTransition.GeneratedEasingFunction>
          </VisualTransition>
        </VisualStateGroup.Transitions>
        <VisualState x:Name="Hidden">
          <Storyboard>
            <DoubleAnimation Duration="0"
                             To="-90"
                             Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)"
                             Storyboard.TargetName="urlBox"
                             d:IsOptimized="True" />
            <DoubleAnimation Duration="0"
                             To="0"
                             Storyboard.TargetProperty="(UIElement.Opacity)"
                             Storyboard.TargetName="urlBox"
                             d:IsOptimized="True" />
          </Storyboard>
        </VisualState>
        <VisualState x:Name="Shown">
          <Storyboard>
            <DoubleAnimation Duration="0"
                             To="0"
                             Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)"
                             Storyboard.TargetName="urlBox"
                             d:IsOptimized="True" />
            <DoubleAnimation Duration="0"
                             To="1"
                             Storyboard.TargetProperty="(UIElement.Opacity)"
                             Storyboard.TargetName="urlBox"
                             d:IsOptimized="True" />
          </Storyboard>
        </VisualState>
      </VisualStateGroup>
    </VisualStateManager.VisualStateGroups>
    <Grid.RowDefinitions>
      <RowDefinition Height="34" />
      <RowDefinition />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <VisualStateManager.CustomVisualStateManager>
      <ic:ExtendedVisualStateManager />
    </VisualStateManager.CustomVisualStateManager>
    <Popup IsOpen="False"
           x:Name="messagePopup"
           VerticalAlignment="Center"
           HorizontalAlignment="Center"
           Grid.Row="1"
           HorizontalOffset="-67.5"
           VerticalOffset="-25">
      <Border Background="#BF000000"
              x:Name="messageBorder"
              BorderThickness="1"
              CornerRadius="10">
        <TextBlock Margin="12"
                   x:Name="messageBlock"
                   FontFamily="Segoe WP SemiLight"
                   FontSize="18.667"
                   Text="Test Message" />
      </Border>
    </Popup>
    <ctrls:AppHeader />
    <!--ContentPanel - place additional content here-->
    <Grid x:Name="ContentPanel"
          Grid.Row="1"
          Grid.RowSpan="2">
      <phone:WebBrowser x:Name="browser"
                        IsScriptEnabled="True" />
    </Grid>
    <ctrls:BusyPane x:Name="busyPane"
                    Visibility="Collapsed"
                    Grid.RowSpan="3" />
    <Grid x:Name="urlBox"
          Grid.Row="2"
          Background="{StaticResource PhoneBackgroundBrush}"
          Opacity="0">
      <Grid.Projection>
        <PlaneProjection CenterOfRotationY="1"
                         RotationX="-92" />
      </Grid.Projection>
      <TextBox x:Name="urlTextBox" >
        <!--<TextBox.Template>
          <ControlTemplate>
            <ContentControl x:Name="ContentElement"
                            BorderThickness="0"
                            HorizontalContentAlignment="Stretch"
                            Margin="{StaticResource PhoneTextBoxInnerMargin}"
                            Padding="{TemplateBinding Padding}"
                            VerticalContentAlignment="Stretch" />
          </ControlTemplate>
        </TextBox.Template>-->
      </TextBox>
    </Grid>
  </Grid>
</phone:PhoneApplicationPage>
